1 Executive Summary

The aim of this report is to investigate any effects of self-quarantines due to COVID-19 on people’s hobbies. We have observed that, though not significant, people dropped few of their hobbies when their quarantine was over. We also investigated the relation between how many hobbies people picked up and how reliant they were to their hobbies as a coping mechanism. However we concluded that they were not related, due to low correlation values



2 Full Report

2.1 Initial Data Analysis (IDA)

A primary, statistical, online survey was conducted where suitable questions for the research were asked. Although this allows for a large amount of information to be collected with minimal effort and cost, some limitations followed in with the advantages. Firstly, since the survey was voluntary, a voluntary response bias and a lack of random sampling had occurred which could lead to distorted results. Since the primary platform in which the survey was posted is mainly used by students from the University of Sydney, most of the data collected were aged between 17 to 23 which does not represent the overall population. On top of this, there was also a limited number of people that had completed the survey (29 respondents), especially within the 2-week short span availability of the survey. Furthermore, there may have been distorted memories of the respondents as certain questions asked about memories from over a year ago (start of quarantine period), questions may have been misinterpreted, and subjective opinions may arise from questions asking the respondents to rate on a scale of 0 to 5, which could to statistical errors.

#Load our data
survey = read.csv("HobbiesCOVID19.csv")

# Remove the Timestamp column as it is not necessary for our report
survey$Timestamp <- NULL

# Quick look at the structure of data
str(survey)
## 'data.frame':    29 obs. of  9 variables:
##  $ age           : chr  "17-23" "17-23" "17-23" "17-23" ...
##  $ gender        : chr  "Male" "Female" "Female" "Female" ...
##  $ covidhobbyno  : int  2 1 0 6 2 3 6 0 4 3 ...
##  $ covidhobbytype: chr  "Cooking/baking, Learning Japanese" "Sports/exercise, Cooking/baking" "Literature, Music, Sports/exercise, Video games, Movies/TV shows" "Literature, Music, Sports/exercise, Arts, Video games, Movies/TV shows" ...
##  $ reliance      : int  3 4 0 4 3 2 3 5 4 2 ...
##  $ continue      : chr  "Yes" "No" "Yes" "Yes" ...
##  $ nowhobbyno    : int  2 0 4 4 1 2 3 0 3 2 ...
##  $ nowhobbytype  : chr  "Cooking/baking, Learning Japanese" "" "Literature, Sports/exercise, Video games" "Music, Sports/exercise, Video games, Movies/TV shows" ...
##  $ discontinue   : chr  "" "Not enough time, Was not suitable for me/became bored" "Not enough time" "Not enough time, Bored" ...
# Quick look at top 5 rows of data
head(survey) 
##     age gender covidhobbyno
## 1 17-23   Male            2
## 2 17-23 Female            1
## 3 17-23 Female            0
## 4 17-23 Female            6
## 5 17-23   Male            2
## 6 17-23 Female            3
##                                                           covidhobbytype
## 1                                      Cooking/baking, Learning Japanese
## 2                                        Sports/exercise, Cooking/baking
## 3       Literature, Music, Sports/exercise, Video games, Movies/TV shows
## 4 Literature, Music, Sports/exercise, Arts, Video games, Movies/TV shows
## 5                                       Sports/exercise, Movies/TV shows
## 6                              Music, Arts, Video games, Movies/TV shows
##   reliance continue nowhobbyno
## 1        3      Yes          2
## 2        4       No          0
## 3        0      Yes          4
## 4        4      Yes          4
## 5        3      Yes          1
## 6        2      Yes          2
##                                           nowhobbytype
## 1                    Cooking/baking, Learning Japanese
## 2                                                     
## 3             Literature, Sports/exercise, Video games
## 4 Music, Sports/exercise, Video games, Movies/TV shows
## 5                                      Movies/TV shows
## 6                               Music, Movies/TV shows
##                                             discontinue
## 1                                                      
## 2 Not enough time, Was not suitable for me/became bored
## 3                                       Not enough time
## 4                                Not enough time, Bored
## 5                                    Lack of motivation
## 6                                       Not enough time
# Our data has 29 rows and 9 columns

# Size of the data
dim(survey)
## [1] 29  9
# R's classification of survey's data
class(survey)
## [1] "data.frame"
## R's classification of variables
str(mtcars)
## 'data.frame':    32 obs. of  11 variables:
##  $ mpg : num  21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ...
##  $ cyl : num  6 6 4 6 8 6 8 4 4 6 ...
##  $ disp: num  160 160 108 258 360 ...
##  $ hp  : num  110 110 93 110 175 105 245 62 95 123 ...
##  $ drat: num  3.9 3.9 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 ...
##  $ wt  : num  2.62 2.88 2.32 3.21 3.44 ...
##  $ qsec: num  16.5 17 18.6 19.4 17 ...
##  $ vs  : num  0 0 1 1 0 1 0 1 1 1 ...
##  $ am  : num  1 1 1 0 0 0 0 0 0 0 ...
##  $ gear: num  4 4 4 3 3 3 3 4 4 4 ...
##  $ carb: num  4 4 1 1 2 1 4 2 2 4 ...
#sapply(mtcars, class)

Summary:


2.2 Research Question 1

How did COVID-19 affected people’s hobbies → Number of hobbies during and after covid, bar graph

# Number of hobbies picked up during quarantine
barplot(table(survey$covidhobbyno), main="Number of hobbies picked up during quarantine", xlab="Number of hobbies", ylab="Answers")

summary(survey$covidhobbyno)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   2.000   2.000   2.552   3.000   6.000
mean(survey$covidhobbyno)
## [1] 2.551724
#Number of hobbies now
barplot(table(survey$nowhobbyno), main="Number of hobbies now", xlab="Number of hobbies", ylab="Answers")

summary(survey$nowhobbyno)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.000   2.000   2.103   3.000   4.000
library(multicon)
## Loading required package: psych
## Loading required package: abind
## Loading required package: foreach
mean=c(mean(survey$covidhobbyno), mean(survey$nowhobbyno))
names= c("COVID", "Now")
se= c(popsd(survey$covidhobbyno)/sqrt(length(survey$covidhobbyno)), popsd(survey$nowhobbyno)/sqrt(length(survey$nowhobbyno)))
meanhobby = data.frame(names, mean, se)


library(ggplot2)
## 
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
## 
##     %+%, alpha
ggplot(meanhobby, aes(x=names, y=mean))+geom_bar(stat='identity')+geom_errorbar( aes(x=names, ymin=mean-se, ymax=mean+se), width=0.2, colour="black", alpha=0.9, size=0.8)

Summary:

2.3 Research Question 2

What kind of hobbies people start doing during Covid?

covidhobbytypes=strsplit(survey$covidhobbytype, ", ")
covidhobbytypes=table(unlist(covidhobbytypes))

# Install packages ggplot2
library(ggplot2)

covidtypes = data.frame(covidhobbytypes)
names(covidtypes)[names(covidtypes) == "Var1"] <- "Hobbies"
names(covidtypes)[names(covidtypes) == "Freq"] <- "Answers"
p1 = ggplot(covidtypes, aes(x = Hobbies, y = Answers), ) + geom_bar(stat = "identity")+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
p1

What kinds of hobbies people still do after quarantine?

nowhobbytypes=strsplit(survey$nowhobbytype, ", ")
nowhobbytypes=table(unlist(nowhobbytypes))

nowtypes = data.frame(nowhobbytypes)
names(nowtypes)[names(nowtypes) == "Var1"] <- "Hobbies"
names(nowtypes)[names(nowtypes) == "Freq"] <- "Answers"
p2 = ggplot(nowtypes, aes(x = Hobbies, y = Answers), ) + geom_bar(stat = "identity")+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
p2

2.4 Research Question 3

Is there a linear relationship between the number of hobbies and people’s reliance of hobbies (number of hobbies vs comfort level)

# Construct a scatter plot
library(ggplot2)
plot(survey$covidhobbyno, survey$reliance, xlab = "Number of hobbies", ylab = "Reliance")

# Calculate the linear regression model to draw on the scatter plot
L = lm(survey$covidhobbyno ~ survey$reliance)

summary(L)
## 
## Call:
## lm(formula = survey$covidhobbyno ~ survey$reliance)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9785 -0.7450 -0.2779  0.7221  3.4885 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       1.8109     0.7267   2.492   0.0191 *
## survey$reliance   0.2335     0.2122   1.100   0.2809  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.473 on 27 degrees of freedom
## Multiple R-squared:  0.04291,    Adjusted R-squared:  0.007466 
## F-statistic: 1.211 on 1 and 27 DF,  p-value: 0.2809
L$coeff
##     (Intercept) survey$reliance 
##       1.8108883       0.2335244
abline(L)

# Caluculate the linear correlation coefficient
cor(survey$covidhobbyno, survey$reliance)
## [1] 0.2071563
#residual
plot(survey$covidhobbyno,L$residuals, xlab = "Number of hobbies", ylab = "Reliance")
abline(h = 0, col = "blue")

Summary:

3 References

APA:

  • Krause, A.E., Dimmock, J., Rebar, A.L. and Jackson, B. (2021). Music Listening Predicted Improved Life Satisfaction in University Students During Early Stages of the COVID-19 Pandemic. Frontiers in Psychology, 11.
  • Michael Merschel (2020). Your pandemic hobby might be doing more good than you know. American Heart Association News. Accessed 20 April 2021.


4 Beyond the Basics - extending your abilities with RMarkdown

This quick reference guide will cover some basic RMarkdown for use in your projects.


4.1 Lists

Here is a basic list:

  • To do 1

  • To do 2

  • To do 3


4.3 Tables

Here is a simple table.

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1


4.4 Images

Here is am image. It has not been adjusted in the rmd file, so represents the true size of the original image. This image is sourced directly from an online url.

To learn more about adding images directly from your own computer, see the comments in this rmd file.


Image source: https://petcube.com/blog/10-all-important-kitten-supplies-infographic/


4.5 Videos

Below you will find a video embedded into your RMarkdown file. Change the YouTube link in the rmd file to get a different video.


4.6 LaTeX

You can even use LaTeX in an RMarkdown document!

For example, how could you work out \(\sum_{i=1}^{5} x_{i}^3\)?


4.7 R Code

Here is an R code chunk:

Try the following commands in R.

1+ exp(3) + sin(0.5)
x=c(1,2,3)
x^2
sum(x)

Here is some in-line code in-line code. You can put any R code here for display, e.g. sum(x)


5 RMarkdown Resources

Check out the resources below for more information on RMarkdown.

How to use R Markdown

Mastering Markdown